forked from crypto-org-chain/cronos
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set DefaultPowerReduction in app.go, added flags to script, changed swap calculation, made backup folder unique and added useful swap scripts. #8
Merged
alpha-omega-labs
merged 30 commits into
alpha-omega-labs:release.46.15
from
zenodeapp:release.46.15
Sep 14, 2023
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…alculate swapfile
zenodeapp
changed the title
Added --x-crisis-skip-assert-invariants and changed swap calculation to check available mem and swap instead of checking the total
Added --x-crisis-skip-assert-invariants, changed swap calculation and added useful swap scripts
Sep 4, 2023
Signed-off-by: ZENODE <[email protected]>
Signed-off-by: ZENODE <[email protected]>
Set DefaultPowerReduction in app.go
zenodeapp
changed the title
Added --x-crisis-skip-assert-invariants, changed swap calculation and added useful swap scripts
Set DefaultPowerReduction in app.go, added flags to script, changed swap calculation, added swap scripts and made backup folder unique.
Sep 13, 2023
zenodeapp
changed the title
Set DefaultPowerReduction in app.go, added flags to script, changed swap calculation, added swap scripts and made backup folder unique.
Set DefaultPowerReduction in app.go, added flags to script, changed swap calculation, made backup folder unique and added useful swap scripts.
Sep 13, 2023
…toring is based on flag
alpha-omega-labs
pushed a commit
that referenced
this pull request
Feb 1, 2024
Attempt to upgrade v1.0.12 to v1.0.15
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changed DefaultPowerReduction
The DefaultPowerReduction in our cronos fork was never changed in the
app.go
file. This caused the chain to get a consensus failure error upon committing a new block. As we use tokens with 18 decimals, instead of 6, very large numbers were used to calculate the total voting power incosmos-sdk
, resulting in a valset that was too large and triggered an overflow error in CometBFT (Tendermint fork).Script flags/options
Running
sh genesisd.sh
gives:Especially flags like
--skip-state-download
and--reset-priv-val-state
will be of use for us in the upcoming upgrade. I believe that those who haven't upgraded at all should use the flag--reset-priv-val-state
, but those who already tried upgrading and have their nodes running should not use that flag to prevent a potential double-sign to occur (which could lead to them getting slashed, which is steep for double-signing. Think it was 5% for double-signing).Backup folder name
The backup folder was named
.genesisd_backup
, but running the script multiple times or stopping it mid-process could lead to nasty overwrites and loss of important data. Therefore every time the script is run a unique name is generated based on the system's current time (ex:.genesisd_backup_20230913213142
).WARNING: running the script multiple times will continue to create new backup folders. Since our state file is large this would mean that it will be around ~14GB every time a backup is made. Make sure to remove older backup folders if you plan on running the script more often (testing purposes for instance). They're hidden folders in the root folder; use
cd ~
thenls -a
to see them.Swap calculation
Some are not able to get the service running because of the amount of swap it's creating on a system that is under load. It's better to check
MemAvailable
andSwapFree
instead ofMemTotal
andSwapTotal
. While it is not that accurate (as this highly depends on the moment the script is run), it is still better than checking the total.Therefore I had to move the halting of the
genesisd
andgenesis
services before the swap calculation, else theSwapFree
andMemAvailable
calculation would be off if the service was running already.Useful swap scripts (Bonus)
I've added some swap scripts to quickly add or remove swap (genesisd swapfiles, not other ones).
First
cd genesisL1/genesisd_scripts
into the folder.Adding swap
sh swap_add.sh <amount_of_swap_in_gb>
(ex:sh swap_add.sh 50
creates a new genesisd_swapfile that is 50GB big)Removing swap
sh swap_remove.sh <filename>
(ex:sh swap_remove.sh /genesisd_swapfile_2
)Removing all swaps
sh swap_remove_all.sh
(removes only genesisd_swapfiles)